<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------

//code返回的封装
function code($code=null,$msg=null,$data=null){
    $cb = [
        'code' => $code,//状态码
        'msg' => $msg,//返回信息
        'data' => $data//返回自定义的数据 也可以是url
    ];
    return json($cb);
}




?>